<template>
	<view class="prac-title" @click="navigateTo(pracURL)">
		<view class="title-left">
			<view class="title-sidebar"></view>
			<view class="title-text">
				<slot></slot>
			</view>
		</view>
		<u-icon class="iconClass" name="arrow-right"></u-icon>
	</view>
</template>

<script>
	export default {
		props: {
			pracURL: String,
		},
		data() {
			return {

			}
		},
		methods: {
			navigateTo(pracURL) {
				uni.navigateTo({
					url: '/pages/exam/' + this.pracURL,
					animationType: 'pop-in',
					animationDuration: 200
				});
			}
		}
	}
</script>

<style lang="scss">
	.prac-title {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 70rpx;
		// background-color: #0077AA;
		padding: 20rpx 30rpx 0 30rpx;

		.title-left {
			display: flex;

			.title-sidebar {
				margin-top: 5rpx;
				background-color: $theme-color;
				width: 10rpx;
				height: 32rpx;
				border-radius: 10rpx;
			}

			.title-text {
				margin-left: 15rpx;
				font-size: 32rpx;
				font-weight: bold;
				// line-height: 70rpx;
			}
		}

		.iconClass {}

	}
</style>
